package com.zls.controller;

import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/student")
public class StudentController {
    @GetMapping("/add")
    public String add(){
        return "Student Add";
    }
//    @PostAuthorize("hasAuthority('update')")
    @RequestMapping("/update")
    public String update(){
        System.out.println("update......");
        return "Student Update";
    }
    @PostAuthorize("hasAuthority('update')")
    @RequestMapping("/delete")
    public String delete(){
        System.out.println("delete......");
        return "Student delete";
    }
}
